import HtmlWebpackPlugin from 'html-webpack-plugin';
import iframeCommunicationWebpackPlugin from 'webpack-plugin-iframe-communicator';

const config = {
  entry: './src/main.js',
  mode: 'development',
  devServer: {
    compress: true,
    port: 23974,
    host: '0.0.0.0',
    allowedHosts: 'all',
  },
  plugins: [
    new HtmlWebpackPlugin({
      template: './src/index.html',
    }),
    new iframeCommunicationWebpackPlugin({
      hostOrigin: 'https://23973.d.d8d.fun' // Trusted host origin
    }),
  ],
};

export default config;